<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Home\Controller;
use OT\DataDictionary;

/**
 * 前台首页控制器
 * 主要获取关于我们聚合数据
 */
class AboutController extends HomeController {

	//关于我拉首页
    public function index(){

        //头部数据
        $wherenav=array(
            'language' => 0,
            'parentid' => 0
        );
        $nav=M('navigator')
            ->where($wherenav)
            ->order('sort')
            ->select();
        foreach ($nav as $key=>$value){
            $nav[$key]['list']=M('navigator')->where(array('parentid'=>$value['id']))->select();
        }
        $this->assign('nav',$nav);
        //头部数据
        //banner
        $banner=M('otherbanner')
            ->where(array('path'=>'/News/showbyid'))
            ->find();
        $this->assign('banner',$banner['pictureid']);
        //banner
        $this->display();
    }

}